package unreleased.geppetto.cat.programs;


import geppetto.cat.corpus.BilingualCorpus;

import java.io.IOException;



public class TestEvolutionWithIterationsM1Agree {
	private String corpusDescription;

	private int size, maxSentenceSize, nrIterations;

	BilingualCorpus corpusF, corpusB;

	public void initCorpus(String args[]) throws IOException {
		corpusDescription = args[0];
		size = Integer.parseInt(args[1]);
		maxSentenceSize = Integer.parseInt(args[2]);
		nrIterations = Integer.parseInt(args[3]);
		System.out.println("Corpus " + corpusDescription);
		System.out.println("Corpus Size " + size);
		System.out.println("Max sentence size " + maxSentenceSize);
		System.out.println("---");
		System.out.println("Loading Corpus");
		corpusF = BilingualCorpus.getCorpusFromFileDescription(
				corpusDescription, size, maxSentenceSize);
		corpusB = corpusF.reverse();
	}

//	public Evaluation[] runModel(int nrIterations, double smooth) {
//		AgreementM1 m1 = new AgreementM1(corpusF, corpusB, 0, 5);
//		Evaluation[] evals = new Evaluation[nrIterations];
//		// m1.train(2);
//		evals = m1.trainWithResults(nrIterations, BilingualCorpus.DEV_CORPUS);
//		return evals;
//	}
//
//	public static void main(String[] args) throws IOException {
//		TestEvolutionWithIterationsM1Agree test = new TestEvolutionWithIterationsM1Agree();
//		test.initCorpus(args);
//		Evaluation[] evals = test.runModel(test.nrIterations, 0);
//		for (int i = 0; i < test.nrIterations; i++) {
//			System.out.println((i + 1) + " " + evals[i].toSimpleString());
//		}
//	}
}
